﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class MemoryDatabase : CustomDatabase
{
    private List<Customer> vector;

    public MemoryDatabase()
    {
        vector = new List<Customer>();
    }

    public void storeCustomer(Customer customer)
    {
        Customer copy = (Customer)customer.clone();
        vector.Add(copy);
    }

    public void printCustomers()
    {
        for (int i = 0; i < vector.Count; i++)
        {
            vector[i].printDetails();
        }
    }

    public void deleteCustomer(Customer client)
    {
        for (int i = 0; i < vector.Count; i++)
        {
            if ((vector[i].getNume() == client.getNume()) && (vector[i].getProcNume() == client.getProcNume()) && (vector[i].getRAMNume() == client.getRAMNume()) && (vector[i].getMonitorNume() == client.getMonitorNume()))
            {
                vector.Remove(vector[i]);
            }
        }
    }
}
